Support thread: http://www.zen-cart.com/forum/showthread.php?t=57694
Download link: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=405
Logo Sidebox creates a sidebox where you can place a logo image.
Designed for: Zen Cart v1.3.+
Includes an option to make the logo a hyperlink.
DOES NOT WRITE OVER ANY CORE FILES.
Ready to get started? Just follow the installation instructions.
Any questions, just hit the forums: http://www.zen-cart.com/forum/showthread.php?t=57694
!!READ EVERYTHING!!
!!!!!BACKUP YOUR STORE BEFORE YOU BEGIN!!!!!
Unzip the Package.
Before uploading change the YOUR_TEMPLATE folders to match the name of your custom template.
includes/languages/english/extra_definitions/YOUR_TEMPLATE/logo_sidebox_defines.php
includes/modules/sideboxes/YOUR_TEMPLATE/logo_sidebox.php
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_logo_sidebox.php
The files are arranged in the same structure as Zen Cart so you can FTP the includes folder to your server.
Login in to your admin panel admin -> tools -> layout boxes controller and activate the new sidebox.
Using an image editor create your logo image. The width of the image whould be the same width or less as your column width (I find that 125 works very well). The height can be anthing you want but square images work best.
Save your new image to includes/templates/YOUR_TEMPLATE/images/your_image.???
Your logo image is managed in the define statements located in:
includes/languages/english/extra_definitions/YOUR_TEMPLATE/logo_sidebox_defines.php
(no need to edit module or template files for most purposes)
define('BOX_HEADING_LOGO_SIDEBOX', '');//leave blank if you don't want a heading for the box
//Logo number 1
define('LOGO_SIDEBOX_IMAGE_WIDTH', '125');
define('LOGO_SIDEBOX_IMAGE_HEIGHT', '125');
define('LOGO_SIDEBOX_IMAGE', 'logo_test.jpg');
define('LOGO_SIDEBOX_IMAGE_TEXT', 'My Logo');
define('LOGO_IMAGE', zen_image($template->get_template_dir(LOGO_SIDEBOX_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO_SIDEBOX_IMAGE, LOGO_SIDEBOX_IMAGE_TEXT, LOGO_SIDEBOX_IMAGE_WIDTH, LOGO_SIDEBOX_IMAGE_HEIGHT));
//this is optional if you want to use the logo as a link
//add your link information to the define statement below
//examples
//define('LOGO_SIDEBOX_LINK', '"http://your_link.com/" rel="external" target="_blank"');//only if you want to open in a new window
//define('LOGO_SIDEBOX_LINK', '"http://your_link.com/"');//if you want to open in the same window, such as going to your own site's page
//define('LOGO_SIDEBOX_LINK', '"index.php?main_page=whatever&id=etc"');//for a link to a page on your site
define('LOGO_SIDEBOX_LINK', '');
If you want another logo in this sidebox, duplicate ALL of these LOGO_SIDEBOX_ defines with a 2 appended, like LOGO2_SIDEBOX_WHATEVER
Then duplicate the image code in tpl_logo_sidebox.php similarly as
$logo2_image =
and add
. $logo2_image
to the $content = statement
To clone this sidebox you would rename these files:
includes/languages/english/extra_definitions/YOUR_TEMPLATE/logo_sidebox_defines.php
includes/modules/sideboxes/YOUR_TEMPLATE/logo_sidebox.php
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_logo_sidebox.php
to the following:
includes/languages/english/extra_definitions/YOUR_TEMPLATE/logo2_sidebox_defines.php
includes/modules/sideboxes/YOUR_TEMPLATE/logo2_sidebox.php
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_logo2_sidebox.php
The contents of the files would similarly be renamed to reflect the logo2 designation.
logo2_sidebox_defines.php
define('BOX_HEADING_LOGO2_SIDEBOX', '');
//Logo number 1
define('LOGO2_SIDEBOX_IMAGE_WIDTH', '128');
define('LOGO2_SIDEBOX_IMAGE_HEIGHT', '128');
define('LOGO2_SIDEBOX_IMAGE', 'label_new_red.png');
define('LOGO2_SIDEBOX_IMAGE_TEXT', 'My Logo two');
define('LOGO2_IMAGE', zen_image($template->get_template_dir(LOGO2_SIDEBOX_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . LOGO2_SIDEBOX_IMAGE, LOGO2_SIDEBOX_IMAGE_TEXT, LOGO2_SIDEBOX_IMAGE_WIDTH, LOGO2_SIDEBOX_IMAGE_HEIGHT));
//this is optional if you want to use the logo as a link
//add your link information to the define statement below
//examples
//define('LOGO2_SIDEBOX_LINK', '"http://your_link.com/" rel="external" target="_blank"');//only if you want to open in a new window
//define('LOGO2_SIDEBOX_LINK', '"http://your_link.com/"');//if you want to open in the same window, such as going to your own site's page
//define('LOGO2_SIDEBOX_LINK', '"index.php?main_page=whatever&id=etc"');//for a link to a page on your site
define('LOGO2_SIDEBOX_LINK', '');
logo2_sidebox.php
test if box should display
$show_logo2_sidebox = true;
if ($show_logo2_sidebox == true) {
require($template->get_template_dir('tpl_logo2_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_logo2_sidebox.php');
$title = BOX_HEADING_LOGO2_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
tpl_logo2_sidebox.php
$logo2_image = (LOGO2_SIDEBOX_LINK == '')? LOGO2_IMAGE: '<a href=' . LOGO2_SIDEBOX_LINK . '>' . LOGO2_IMAGE . '<
/a>';
$content = '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">' . $logo2_image . '<
/div>';
To uninstall Logo Sidebox completely, follow these instructions.
Manually delete the following files:
includes/languages/english/extra_definitions/YOUR_TEMPLATE/logo_sidebox_defines.php
includes/modules/sideboxes/YOUR_TEMPLATE/logo_sidebox.php
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_logo_sidebox.php
(Clyde Jones: http://clydedesigns.com/)
Additional Acknowledgement: Glenn Herbert(gjh42)
Version 2.1 - Clyde Jones, Glenn Herbert(gjh42) - 5/17/2011 -
Cleaned up the code.
re-wrote the readme files.
Version 2.0 - Clyde Jones - 2/13/2010 - Updated for compatibility with Zen Cart version 1.3.9 and php 5
Version 1-1 - Clyde Jones - 8/21/2008 -
Updated installation instructions.
Added Un-install instructions.
Version 1.0 - Clyde Jones - 12/11/2006 - Updated to include an option to make the logo a hyperlink.
Version 1.0 - 12/10/2006 - initial release
Logo Sidebox is released under the General Public License (see LICENSE.txt)
This module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Always backup your shop and database before making changes.